package com.ares.aler.controllr;

import com.ares.aler.entiy.NavPo;
import com.ares.aler.entiy.PicPo;
import com.ares.aler.mapper.MsgMapperDao;
import com.ares.aler.service.NavDao;
import com.ares.aler.service.PicDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * 负责前端页面的跳转
 * 不负责数据处理
 */

@Controller
public class initController {

    @Autowired
    PicDao picDao ;
    @Autowired
    NavDao navDao ;

    @Autowired
    MsgMapperDao msgMapperDao;
    @RequestMapping("")
    public String httpClientString(Model model) {
        List<PicPo> list = picDao.picSelectLun();
        List<NavPo> navPoList = navDao.selectall();
        List<Map<String, Object>> navTree = navDao.navTree();
        model.addAttribute("piclist", list);
        model.addAttribute("navlist", navPoList);
        model.addAttribute("navTree", navTree);
        return "system/index";
    }
}
